package com.tis.database.entitys;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.*;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * The persistent class for the A_GEN_CODE database table.
 * @Table(name="A_GEN_CODE", uniqueConstraints = { @UniqueConstraint(columnNames = "A_GEN_CODE_ID") })
 */
@Entity
@Table(name="A_GEN_CODE") 
@NamedQueries({
    @NamedQuery(name = AGenCode.findAll, query = "FROM AGenCode c "),
    @NamedQuery(name = AGenCode.findInID, query = "FROM AGenCode c WHERE c.pkId in(:pkId) Order by :p_orderby "),
    @NamedQuery(name = AGenCode.findById, query = "FROM AGenCode c WHERE  c.pkId = :pkId "),
    @NamedQuery(name = AGenCode.findByCode, query = "FROM AGenCode c WHERE c.pkId = :pkId And c.code = :code ")
    })
public class AGenCode implements Serializable {
	private static final long serialVersionUID = 1L;
		
	@Transient
	public static final String findAll = "AGenCode_findAll";
	
	@Transient
	public static final String findInID = "AGenCode_findInID";
	
	@Transient
	public static final String findById = "AGenCode_findById";
	
	@Transient
	public static final String findByCode = "AGenCode_findByCode";
	
	@Id
	@Column(name="A_GEN_CODE_ID")
	private BigDecimal pkId;

	@Column(name="A_GEN_TYPE_ID")
	private BigDecimal aGenTypeId;

	@Column(name="CODE")
	private String code;

	@Column(name="CREATED_BY")
	private String createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="DESCRIPTION")
	private String description;

	@Column(name="ISACTIVE")
	private String isactive;

	@Column(name="MSG_CODE")
	private String msgCode;

	@Column(name="MSG_DESC")
	private String msgDesc;

	@Column(name="NAME")
	private String name;

	@Column(name="STATUS")
	private String status;

	@Column(name="UPDATED_BY")
	private String updatedBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="UPDATED_ON")
	private Date updatedOn;
	
	public AGenCode() {
	}

	public AGenCode(BigDecimal pkId) {
		this.pkId = pkId;
	}

	/**
	 * @return the pkId
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public BigDecimal getPkId() {
		return pkId;
	}

	/**
	 * @param pkId the pkId to set
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setPkId(BigDecimal pkId) {
		this.pkId = pkId;
	}

	/**
	 * @return the aGenTypeId
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public BigDecimal getaGenTypeId() {
		return aGenTypeId;
	}

	/**
	 * @param aGenTypeId the aGenTypeId to set
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setaGenTypeId(BigDecimal aGenTypeId) {
		this.aGenTypeId = aGenTypeId;
	}

	/**
	 * @return the code
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the createdBy
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getCreatedBy() {
		return createdBy;
	}

	/**
	 * @param createdBy the createdBy to set
	 * Date =Aug 28, 2013 : 4:46:58 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	/**
	 * @return the createdOn
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public Date getCreatedOn() {
		return createdOn;
	}

	/**
	 * @param createdOn the createdOn to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	/**
	 * @return the description
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the isactive
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getIsactive() {
		return isactive;
	}

	/**
	 * @param isactive the isactive to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}

	/**
	 * @return the msgCode
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getMsgCode() {
		return msgCode;
	}

	/**
	 * @param msgCode the msgCode to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setMsgCode(String msgCode) {
		this.msgCode = msgCode;
	}

	/**
	 * @return the msgDesc
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getMsgDesc() {
		return msgDesc;
	}

	/**
	 * @param msgDesc the msgDesc to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setMsgDesc(String msgDesc) {
		this.msgDesc = msgDesc;
	}

	/**
	 * @return the name
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the status
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the updatedBy
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public String getUpdatedBy() {
		return updatedBy;
	}

	/**
	 * @param updatedBy the updatedBy to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	/**
	 * @return the updatedOn
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public Date getUpdatedOn() {
		return updatedOn;
	}

	/**
	 * @param updatedOn the updatedOn to set
	 * Date =Aug 28, 2013 : 4:46:59 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	public void setUpdatedOn(Date updatedOn) {
		this.updatedOn = updatedOn;
	}

	@Override
	public String toString()
	{
		return ToStringBuilder.reflectionToString(this);
	}

}